﻿namespace NJQuery {
	using System;

	/// <summary>
	/// Provides event data for the <see cref="AccordionPanel.Activating" /> event.
	/// </summary>
	public class AccordionPanelActivatingEventArgs : EventArgs {


		#region Fields

		private AccordionPanel oldActive;
		private bool cancel;

		#endregion


		#region Constructors

		/// <summary>
		/// Creates a new instance of the <see cref="AccordionChangeStartEventArgs"/> class.
		/// </summary>
		/// <param name="oldActive">The currently active <see cref="AccordionPanel"/>.</param>
		public AccordionPanelActivatingEventArgs(AccordionPanel oldActive) {
			this.oldActive = oldActive;
		}

		#endregion


		#region Properties

		/// <summary>
		/// Gets the currently active <see cref="AccordionPanel"/>.
		/// </summary>
		public virtual AccordionPanel OldActive {
			get { return oldActive; }
		}

		/// <summary>
		/// Gets or sets whether or not the user interaction should be interrupted.
		/// </summary>
		public virtual bool Cancel {
			get { return cancel; }
			set { cancel = value; }
		}

		#endregion


	}

}